#!/bin/bash
DIR=/user/backup/oracle/netdir/
ping -c 5 203.114.247.190 >/dev/null 2>&1
DATE=`date +%F' '%H:%M:%S`
if [ "$?" != "0" ];then
	echo "${DATE} ping public IP 203.114.247.190 is down!">>${DIR}publicip.log
else
	echo "${DATE} ping public IP 203.114.247.190 is up!">>${DIR}publicip.log
fi

ping -c 5 xx.xx..6.150 >/dev/null 2>&1
if [ "$?" != "0" ];then
        echo "${DATE} ping vpn IP xx.xx..6.150 is down!">>${DIR}vpnip.log
else
        echo "${DATE} ping vpn IP xx.xx..6.150 is up!">>${DIR}vpnip.log
fi

